extern crate simple_excel_writer as excelwriter;
extern crate log;
extern crate env_logger;

use log::Level;
use actix_web::{ middleware::Logger, App, HttpServer};
mod webservice;
use webservice::test::exportexcel;

#[actix_web::main]
async fn main() -> std::io::Result<()> {
    // access logs are printed with the INFO level so ensure it is enabled by default
    env_logger::init_from_env(env_logger::Env::new().default_filter_or("info"));

    HttpServer::new(|| {
        App::new()
		    .wrap(Logger::default())
            .service(exportexcel::exportexcel)
    })
	
    .bind("0.0.0.0:8080")?
    .run()
    .await
}
